package com.mab.apipassenger.controller;

import com.mab.apipassenger.service.ServiceOrderService;
import com.msb.internalcommon.dto.ResponseResult;
import com.msb.internalcommon.request.OrderRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: jiudianliu
 * @Date: 2023/7/17 - 07 - 17 - 11:21
 * @Description: com.mab.apipassenger.controller
 * @version: 1.0
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private ServiceOrderService serviceOrderService;
    /**
     * 创建订单/下单
     * @return
     */
    @PostMapping("/add")
    public ResponseResult add(@RequestBody OrderRequest orderRequest){
        return serviceOrderService.add(orderRequest);
    }
}
